﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WSweb.Master" AutoEventWireup="true" CodeBehind="Novosti.aspx.cs" validateRequest="false" Inherits="WSweb.TEST" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" type="text/css" href="css/novosti.css" media="screen" />
    <!--[if IE 7]>
	    <style type="text/css">
	    .header-novosti { padding-top:0px; padding-bottom:50px }
	    </style>
    <![endif]-->
    <script type="text/javascript" src="js/font.js"></script> 
    <script src="js/jquery.sharrre-1.3.2.min.js" type="text/javascript"></script>
    <script src="js/share.js" type="text/javascript"></script>
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBwswebCS %>"
         SelectCommand="SELECT top 10 * FROM [Vijest] ORDER BY [id_vijest] DESC"></asp:SqlDataSource>
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" 
            onitemcommand="Repeater1_ItemCommand">
            <HeaderTemplate>
                <div class="header-novosti">
                    <span>Novosti</span>
                </div>
            </HeaderTemplate>
            <ItemTemplate>
            <div class="content-novosti">
                <a name="<%# Eval("id_vijest") %>">
                <asp:Literal ID="lit_id_vijest" runat="server" Text='<%# Eval("id_vijest") %>' Visible="false"/></a>
                <asp:TextBox ID="fld_naziv" runat="server" Text='<%# Eval("naziv") %>' Visible="false" />
                <h2><a href='Vijest.aspx?id=<%# Eval("id_vijest") %>' title='<%# Eval("naziv") %>'>
                <asp:Literal ID="lit_naziv" runat="server" Text='<%# Eval("naziv") %>' /></a></h2>
                <p style="position:relative;float:left;padding-right:20px;">
                    <a href='Vijest.aspx?id=<%# Eval("id_vijest") %>' title='<%# Eval("naziv") %>'>
                    <asp:Image ID="imageVijest" runat="server" Height="180" ImageUrl='<%# "imgHandler.ashx?id=" + Eval("image_id") %>' CssClass="novosti-img" AlternateText="vijest image" /> 
                    </a>
                </p>
                <p style="padding-top:10px;">
                    <span><asp:Literal ID="lit_sadrzaj" runat="server" Text='<%# Eval("sadrzaj") %>' /></span>
                    <asp:TextBox ID="fld_sadrzaj" runat="server" Text='<%# Eval("sadrzaj") %>' Visible="false" />
                </p>
                <p class="content-novosti-inline">
                    <span class="novosti-font-size">Dodano: <%# Eval("datum") %> | <%# Eval("username") %></span>
                    <br />
                    <span>
                        <asp:LinkButton ID="lnk_Edit" runat="server" Text="Uredi" CommandName="EditThis" />
                        <asp:LinkButton ID="lnk_Cancel" runat="server" Text="Poništi" CommandName="CancelEdit" Visible="false" />
                    </span>
                    <span style="float:right;"><a href="#vrh" title="Vrati se na vrh stranice">Na vrh ^</a></span>
                </p>
            </div>
            </ItemTemplate>
        </asp:Repeater>
    </form>
</asp:Content>
